﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Subgurim.Controles;
using Subgurim.Controls;
using Subgurim.Web;

namespace Gmaps2
{
    public partial class WebForm2 : System.Web.UI.Page
    {
       protected void Page_Load(object sender, EventArgs e) {
           GMap1.addGMapUI(new GMapUI());
           
           GMapUIOptions options = new GMapUIOptions();
           
           GLatLng centro = new GLatLng(-16,-51);
            GMap1.setCenter(centro,4);
            GMap1.enableGTrafficOverlay = true; 
           if (!Page.IsPostBack)
{
   GDirection direction = new GDirection();
   direction.autoGenerate = false;
   direction.buttonElementId = "bt_Go";
   direction.fromElementId = "tb_fromPoint";
   direction.toElementId = "tb_endPoint";
   direction.divElementId = "div_directions"; direction.clearMap = true;


   // Optional
   direction.locale = "br-BR";

   GMap1.Add(direction);
}
} 
    }
}